﻿@model String

@{
    List<WebCore.Models.DataEntities.Role> roles = WebCore.Models.DataManagers.AccountManager.GetRoles();

    foreach (WebCore.Models.DataEntities.Role item in roles)
    {
        if (!String.IsNullOrEmpty(Model) && Model.Contains(item.RoleId + ","))
        {
            <span><input type="checkbox" id="@item.RoleId.ToString().Replace("-", "_")_checkbox" name="@item.RoleId.ToString().Replace("-", "_")_checkbox" value="@item.RoleId" checked="checked"/>@item.RoleName</span><br/>
        }
        else
        {
            <span><input type="checkbox" id="@item.RoleId.ToString().Replace("-", "_")_checkbox" name="@item.RoleId.ToString().Replace("-", "_")_checkbox" value="@item.RoleId"/>@item.RoleName</span><br/>
        }
    }
}